In wireless communication, a mobile terminal (STA, Station) is connected to an access point (AP, Access Point) through a channel, where the channel is selected when the access point AP is powered on. When a channel environment becomes poor, for example, when there is interference caused by a radar, microwave, and the like, channel performance is affected and a transmission rate decreases. As a result, an application requirement for a user cannot be met. Especially, an application similar to Wi-Fi Direct (a technology in which devices on a wireless network can be interconnected directly without using a wireless router) is sensitive to a transmission rate. To meet an application requirement for a user, at this time, channel switching is required to change to a channel with a better environment.
In the prior art, a channel switching method is provided. An access point AP actively initiates channel switching, forces a mobile terminal Station that is connected to the AP to go offline. At this time, the AP breaks a connection to the Station, and the AP performs a channel switching operation. At this time, the mobile terminal Station that is forced to go offline re-searches for an AP that can be accessed, and sets up a communication connection to a neighboring AP that is found.
In a process of implementing the present invention, the inventor finds that the prior art has at least the following problems: in a method provided in the prior art, after an AP breaks a connection to a Station, a user needs to perform manual setting to search for an AP that can be accessed, and therefore the user needs to perform a complex operation. On the other hand, after the Station breaks a connection to the AP, the Station may not find or spends a long time in searching for an AP that can be accessed, thereby resulting in a long service interruption duration and poor user experience.